<#import "macros.ftl" as godt>
<html>
	<head>
		<title>${component.title}</title>
		<link rel="stylesheet" href="../../css/reset.css" />
		<link rel="stylesheet" href="../../css/text.css" />
		<link rel="stylesheet" type="text/css" href="../../css/godt.css" />
		<link rel="stylesheet" href="../../css/960.css" />
		
	</head>
	<body>
		<div class="container_12">
			<div class="grid_12 border_rounded">
				<h1><strong>${component.title}</strong></h1>			
			</div>		
			<div class="clear"></div>
			<div class="grid_12 title">
				<h3><strong>General Properties</strong></h3>
			</div>
			<div class="clear"></div>
			<div class="grid_6 central">
				Description: <em>${component.description}</em><br/>
				Owner: <em>${component.owner}</em>
			</div>
			<div class="grid_6 central">
				Include: <em>${component.include}</em><br/>
				Error Page: <em>${component.errorpage}</em><br/>
				Protected View: <em>${component.protect}</em>
			</div>
			<div class="clear"></div>
			<div class="grid_6 lateral">
				Physical Location: <em>${component.baseDir}/${component.module}/${component.location}</em><br/>
				Mount Point: <em>${component.mountPoint}</em><br/>
				Base permission: <em>${component.basePermission}</em>				
			</div>
			<div class="grid_6 lateral">
				Menu Name: <em>${component.menuName}</em><br/>
				Display in application bar: <em>${component.appBarDisplay}</em><br/>
				Position: <em>${component.position}</em><br/>
				Session cookie accepted: <em>${component.sessionCookieAccepted}</em>
			</div>
			<div class="clear"></div>
			<#if component.handlers?size gt 0>
				<div class="grid_12 title">
					<h3><strong>Registered handlers</strong></h3>
				</div>
				<div class="clear"></div>
				<#list component.handlers?chunk(3) as chunk>
					<#list chunk as handler>
						<div class="grid_4 views">
							<h5>${handler.name}</h5>
							Type: <em>${handler.type}</em><br/>
							Class: <em>${handler.clazz}</em>
						</div>
					</#list>
					<div class="clear"></div>
				</#list>
				<div class="clear"></div>
			</#if>
			<#if component.firstVisitEvents?size gt 0>
				<@godt.listEvents events=component.firstVisitEvents registry=registry title="First Visit Events"/>
			</#if>
			<#if component.preProcessorEvents?size gt 0>
				<@godt.listEvents events=component.preProcessorEvents registry=registry title="PreProcessor Events"/>
			</#if>
			<#if component.postProcessorEvents?size gt 0>
				<@godt.listEvents events=component.postProcessorEvents registry=registry title="PostProcessor Events"/>
			</#if>
			<#if component.afterLoginEvents?size gt 0>
				<@godt.listEvents events=component.afterLoginEvents registry=registry title="After Login Events"/>
			</#if>
			<#if component.beforeLogoutEvents?size gt 0>
				<@godt.listEvents events=component.beforeLogoutEvents registry=registry title="Before logout Events"/>
			</#if>
			<div class="clear"></div>
			<div class="grid_12 gap">&nbsp;</div>
			<div class="clear"></div>
			<#list component.requests as request>
				<div class="grid_12 title" name="${request.uri?default('')}">
					<h3><strong>${request.uri?default('')}</strong></h3>
				</div>
				<div class="clear"></div>
				<div class="grid_12 description">
					${request.description?default('')}
				</div>
				<div class="clear"></div>
				<div class="grid_9 image">
					<img src="images/${request.uri}.png"/>
				</div>
				<div class="clear"></div>
				<div class="grid_3 lateral">
					<h5>Request attributes</h5>
					<@godt.sign value=request.edit?default('true')/>Edit<br/>
					<@godt.sign value=request.trackVisit?default('true')/>Track Visit<br/>
					<@godt.sign value=request.trackServerHit?default('true')/>Track Server Hit
				</div>
				<#if request.event?exists>
				<div class="grid_6 central">
					
						<h5>Event Invoked</h5>
						Name:<em>${request.event.name?default('')}</em><br/>
						Type:<em>${request.event.type?default('')}</em><br/>
						Path:<em>${request.event.path?default('')}</em><br/>
						Invoke:<em><@godt.eventLink registry=registry event=request.event /></em><br/>
						Global Transaction:<@godt.sign value=request.event.globalTransaction?default('true')/>
					
				</div>
				</#if>
				<#if request.security?exists>
				<div class="grid_3 lateral">							
						<h5>Security</h5>
						<@godt.sign value=request.security.https?default('false')/>Requires HTTPS<br/>
						<@godt.sign value=request.security.auth?default('false')/>Requires Authentication<br/>
						<@godt.sign value=request.security.cert?default('false')/>Requires Certificate<br/>
						<@godt.sign value=request.security.externalView?default('true')/>External View<br/>
						<@godt.sign value=request.security.directRequest?default('true')/>Allows Direct Request					
				</div>
				</#if>				
				<div class="clear"></div>
				<#list request.responses?chunk(2) as row>
					<#list row as response>
						<div class="grid_6 views">
							<h5>Response</h5>
							Name:<em>${response.name}</em><br/>
							Type:<em>${response.type}</em><br/>
							Value:<em>${response.value}</em><br/>
							Allowed parameters:<em>${response.allowedParams}</em><br/>
							Save Last View:<em>${response.saveLastView}</em><br/>
							Save Current View:<em>${response.saveCurrentView}</em><br/>
							Save Home View:<em>${response.saveHomeView}</em><br/>
							<#if !response.emptyView>
								<h6>View</h6>
								Description: <em>${response.description}</em><br/>
								Page:<em>${response.page}</em><br/>
								View Type: <em>${response.viewType}</em><br/>
								Info: <em>${response.info}</em><br/>
								Content Type:<em>${response.contentType}</em><br/>
								Encoding: <em>${response.encoding}</em>
							</#if>
						</div>
					</#list>
					<div class="clear"></div>
				</#list>
				<div class="clear"></div>
				<div class="grid_12 gap">&nbsp;</div>
				<div class="clear"></div>							
			</#list>
		</div>
	</body>
</html>